﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FreedomERP.Comm;

namespace FreedomERP.Models.Bd
{
    /************************************************************************/
    /* 龙彩的产品信息类                                                     */
    /************************************************************************/
    public class LCProductInfo : ProductInfo
    {
        //产品零售价格
        public String ProductPrice1 { get; set; }
        //产品批发价格
        public String ProductPrice2 { get; set; }
        //产品其他价格
        public String ProductPrice3 { get; set; }

         public LCProductInfo(){

         }

        public LCProductInfo(ProductInfo prodInfo)
        {

            this.ProductId = prodInfo.ProductId;
            this.ProductName = prodInfo.ProductName;
            this.ProductNumber = prodInfo.ProductNumber;
            this.ProductUnitId = prodInfo.ProductUnitId;
            this.ProductUnitName = prodInfo.ProductUnitName;
            this.ProductModelId = prodInfo.ProductModelId;
            this.ProductModelName = prodInfo.ProductModelName;
            this.ProductQty = prodInfo.ProductQty;
            this.ProductRemark = prodInfo.ProductRemark;
            this.ProductStatusId = prodInfo.ProductStatusId;
            this.ProductStatus = prodInfo.ProductStatus;
            this.ProductOrgId = prodInfo.ProductOrgId;
            this.ProductOrgName = prodInfo.ProductOrgName;
            this.LastModeifyTime = prodInfo.LastModeifyTime;
            foreach (DictionaryEntry pair in prodInfo.prices)
            {
                if (pair.Key.Equals(ConstData.CATEGORY_PROD_PRICE_LC_TYPE1))
                {
                    this.ProductPrice1 = pair.Value.ToString();
                    continue;
                }
                if (pair.Key.Equals(ConstData.CATEGORY_PROD_PRICE_LC_TYPE2))
                {
                    this.ProductPrice2 = pair.Value.ToString();
                    continue;
                }
                if (pair.Key.Equals(ConstData.CATEGORY_PROD_PRICE_LC_TYPE3))
                {
                    this.ProductPrice3 = pair.Value.ToString();
                    continue;
                }
            }

        }
    }
}